From: Jimi Xenidis Date: Tue, 12 Sep 2006 10:47:22 +0000 (-0400) Subject: [POWERPC][XEN] Detect bad spurious interrupt condition and panic instead of hang X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15658^2~73 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=e82f3160cabe1c317912fcc42cc590dee59b72bd;p=xen.git [POWERPC][XEN] Detect bad spurious interrupt condition and panic instead of hang When handing off the MPIC from Xen to Dom0, which is the current yet not permamnet design, the MPIC can cause the processor to assert an external interrupt when none is available. Rather then simply hang in this condition we now panic so the user can see that there is indeed a problem and identify it as this one. This condition seems to be related to temperature and the probablity of it occuring decreases if the machine is allowed to stay idle (not in the Xen panic loop) for a minute or two. Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --- diff --git a/xen/arch/powerpc/external.c b/xen/arch/powerpc/external.c index 8b9e17a886..f1600d1681 100644 --- a/xen/arch/powerpc/external.c +++ b/xen/arch/powerpc/external.c @@ -75,6 +75,7 @@ void deliver_ee(struct cpu_user_regs *regs) void do_external(struct cpu_user_regs *regs) { int vec; + static unsigned spur_count; BUG_ON(!(regs->msr & MSR_EE)); BUG_ON(mfmsr() & MSR_EE); @@ -87,6 +88,14 @@ void do_external(struct cpu_user_regs *regs) do_IRQ(regs); BUG_ON(mfmsr() & MSR_EE); + spur_count = 0; + } else { + ++spur_count; + if (spur_count > 100) + panic("Too many (%d) spurrious interrupts in a row\n" + " Known problem, please halt and let machine idle/cool " + " then reboot\n", + 100); } }